package top.ezzz._test;

import top.ezzz.db.DbProcessInfo;
import top.ezzz.model.ProcessInfo;
import top.ezzz.util.processtype.Holder;
import top.ezzz.util.processtype.TypeInterface;

import java.util.List;

public class DbTest {

    public static void main(String[] args) {
        //Db db = DbConfig.getDb();
        //System.out.println(db);
        Holder holder = new Holder();
        TypeInterface java = holder.getProcessType("java");
        List<ProcessInfo> info = java.getProcessList();
        for (ProcessInfo processInfo : info) {
            DbProcessInfo dbProcessInfo = processInfo.toDbProcessInfo();
            dbProcessInfo.sink();
        }

    }

}
